﻿<UserControl
	x:Class="ExampleApplication.MainPage"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
	xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">

	<Grid x:Name="LayoutRoot" Style="{StaticResource LayoutRootGridStyle}">

		<Grid.RowDefinitions>
			<RowDefinition Height="42"></RowDefinition>
			<RowDefinition Height="*"></RowDefinition>
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="Auto"></ColumnDefinition>
			<ColumnDefinition Width="*"></ColumnDefinition>
		</Grid.ColumnDefinitions>
		<Border Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" x:Name="ContentBorder" Style="{StaticResource ContentBorderStyle}" HorizontalAlignment="Stretch">

			<navigation:Frame x:Name="ContentFrame" Style="{StaticResource ContentFrameStyle}" 
							  Source="/Home" Navigated="ContentFrame_Navigated" NavigationFailed="ContentFrame_NavigationFailed">
				<navigation:Frame.UriMapper>
				  <uriMapper:UriMapper>
					<uriMapper:UriMapping Uri="" MappedUri="/Views/Home.xaml"/>
					<uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}.xaml"/>
					<uriMapper:UriMapping Uri="Examples/{pageName}" MappedUri="/Examples/{pageName}.xaml"/>
					</uriMapper:UriMapper>
				</navigation:Frame.UriMapper>
			</navigation:Frame>
		</Border>

		<Grid Grid.Row="0" Grid.ColumnSpan="2" x:Name="NavigationGrid" Style="{StaticResource NavigationGridStyle}">            
			<Border x:Name="BrandingBorder" Style="{StaticResource BrandingBorderStyle}">
				<StackPanel x:Name="BrandingStackPanel" Style="{StaticResource BrandingStackPanelStyle}">

					<ContentControl Style="{StaticResource LogoIcon}"/>
					<TextBlock x:Name="ApplicationNameTextBlock" Style="{StaticResource ApplicationNameStyle}" 
							   Text="DeepEarth"/>

				</StackPanel>
			</Border>

			<Border x:Name="LinksBorder" Style="{StaticResource LinksBorderStyle}">
				<StackPanel x:Name="LinksStackPanel" Style="{StaticResource LinksStackPanelStyle}">

					<HyperlinkButton x:Name="Link1" Style="{StaticResource LinkStyle}" 
									 NavigateUri="/Home" TargetName="ContentFrame" Content="home"/>
									 
					<Rectangle x:Name="Divider1" Style="{StaticResource DividerStyle}"/>
					
					<HyperlinkButton x:Name="Link2" Style="{StaticResource LinkStyle}" 
									 NavigateUri="/About" TargetName="ContentFrame" Content="about"/>                    
				</StackPanel>
			</Border>
			
		</Grid>

		<StackPanel Grid.Column="0" Grid.Row="1" Orientation="Vertical" HorizontalAlignment="Left" Background="Black">
			<HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/ShowMap" TargetName="ContentFrame" Content="Basic Map"/>
			<HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/ShowNavigation" TargetName="ContentFrame" Content="Navigation"/>
			<HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/ShowMiniMap" TargetName="ContentFrame" Content="Mini Map"/>
			<HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/SetInitialView" TargetName="ContentFrame" Content="Set View"/>
			<HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/ShowAlternateMode" TargetName="ContentFrame" Content="Road Mode"/>
			<HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/ShowAlternateProvider" TargetName="ContentFrame" Content="Tile Source Provider"/>
			<HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/AddFeatures" TargetName="ContentFrame" Content="Add features (xaml)"/>
            <HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/AddFeatures_Code" TargetName="ContentFrame" Content="Add features (code)"/>
            <HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/AddLayers" TargetName="ContentFrame" Content="Add Layers"/>
			<HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/AddOverlay" TargetName="ContentFrame" Content="Add Overlay"/>
			<HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/DataBinding" TargetName="ContentFrame" Content="Databinding"/>
            <HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/ChunkedDataBinding" TargetName="ContentFrame" Content="Chunked Databinding"/>
            <HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/UseDigitizer" TargetName="ContentFrame" Content="Digitizer"/>
			<HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/EditExistingShapes" TargetName="ContentFrame" Content="Edit Shapes"/>
			<HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/UseMeasureTool" TargetName="ContentFrame" Content="Measure Tool"/>
			<HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/AddBitmapLayer" TargetName="ContentFrame" Content="Writeable Bitmap"/>            
			<HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/ShowDayNight" TargetName="ContentFrame" Content="DayNight"/>
			<HyperlinkButton Style="{StaticResource LinkStyle}" 
									 NavigateUri="Examples/ScratchPad" TargetName="ContentFrame" Content="Scratch Pad"/>
		</StackPanel>

	</Grid>

</UserControl>